package indi.gtl.superbrain.fragment;

import indi.gtl.superbrain.R;
import indi.gtl.superbrain.activitys.ScanActivity;
import indi.gtl.superbrain.activitys.ServiceActivity;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;

public class MainFirstFragment extends Fragment{
	Button create_service_main_interface_btn, conn_service_main_interface_btn;
	
@Override
public void onCreate(Bundle savedInstanceState) {
	// TODO Auto-generated method stub
	super.onCreate(savedInstanceState);
}
@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		View view=inflater.inflate(R.layout.main_first_layout, null);
		create_service_main_interface_btn = (Button) view.findViewById(R.id.create_service_main_interface_btn);
		conn_service_main_interface_btn = (Button) view.findViewById(R.id.conn_service_main_interface_btn);
		
		create_service_main_interface_btn.setOnClickListener(new View.OnClickListener() {
			@Override
			public void onClick(View v) {
				getActivity().startActivity(new Intent(getActivity(), ServiceActivity.class));
			}
		});
		conn_service_main_interface_btn.setOnClickListener(new View.OnClickListener() {
			@Override
			public void onClick(View v) {
				getActivity().startActivity(new Intent(getActivity(), ScanActivity.class));
			}
		});
		
		return view;
	}
}
